import React, {Component} from 'react'
import {render} from 'react-dom'
import {Router, Route, IndexRoute, hashHistory} from 'react-router'

import './css/reset.css'
import './scss/common.scss'

import Buy from './Comment/Buy'
import Card from './Comment/Card'
import School from './Comment/School'

class Roots extends Component {
    render() {
        return (
            <div className='container'>{this.props.children}</div>
        );
    }
}
render((
    <Router history={hashHistory}>
        <Route path='/' component={Roots}>
            <IndexRoute component={Card}/>
            <Route path="Buy(/:schoolId)(/:schoolName)(/:schoolAddress)" component={Buy}/>
            <Route path="School(/:schoolId)(/:schoolName)(/:schoolAddress)" component={School}/>
        </Route>
    </Router>
), document.getElementById('app'));

// import WXPay from './Comment/WXPay'
// import PayStatus from './Comment/PayStatus'
// <Route path="/WXPay/PayParam(/:status)(/:msg)" component={WXPay}/>
// <Route path="/PayStatus(/:status)(/:msg)" component={PayStatus}/>
